package org.springblade.modules.repair.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import io.swagger.annotations.ApiOperation;
import org.springblade.core.mp.support.Condition;
import org.springblade.core.mp.support.Query;
import org.springblade.core.secure.BladeUser;
import org.springblade.core.tool.api.R;
import org.springblade.core.tool.utils.Func;
import org.springblade.modules.repair.dto.PlanCheckStatisticsQueryDTO;
import org.springblade.modules.repair.service.MaintainPlanUserDayCountService;
import org.springblade.modules.repair.service.PlanContentStatisticalService;
import org.springblade.modules.repair.vo.check.PlanCheckStatisticsBuildingPageVO;
import org.springblade.modules.repair.vo.plan.statistics.WxBuildingSimpleVO;
import org.springblade.modules.repair.vo.plan.statistics.WxPlanStatusCountVO;
import org.springblade.modules.repair.vo.plan.statistics.WxRepetitionVO;
import org.springblade.modules.repair.vo.statistics.by.*;
import org.springblade.modules.system.service.IDeptService;
import org.springblade.modules.system.vo.DeptVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Map;

/**
 * @Date 11:25 2022/11/29
 * @Description {
 *   保养统计 趋势
 * }
 * @Author lsay
 **/
@RestController
@RequestMapping("/plan/check/statistics")
public class PlanCheckStatisticsController {

	@Autowired
	private MaintainPlanUserDayCountService planUserDayCountService;
	@Autowired
	private PlanContentStatisticalService planContentStatisticalService;
	@Autowired
	private IDeptService deptService;

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计时长详情
	 * }
	 * @Date 11:47 2022/11/29
	 * @Param query
	 * @return CheckStatisticsWorkTimeDetailVO
	 **/
	@PostMapping("/detail/dept/work/time")
	public R<CheckStatisticsWorkTimeDetailVO> selectCheckWorkTimeDeptDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckWorkTimeDeptDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养时长统计 按组
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/work/time")
	public R<List<CheckStatisticsWorkTimeCountVO>> selectCheckWorkTimeDeptCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckWorkTimeDeptCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养时长统计 按人
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/user/work/time")
	public R<List<CheckStatisticsWorkTimeCountVO>> selectCheckWorkTimeDeptUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckWorkTimeDeptUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计状态详情
	 * }
	 * @Date 11:47 2022/11/29
	 * @Param query
	 * @return CheckStatisticsStatusDetailVO
	 **/
	@PostMapping("/detail/dept/status")
	public R<CheckStatisticsStatusDetailVO> selectCheckStatusDeptDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckStatusDeptDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计状态 按组
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/status")
	public R<List<CheckStatisticsStatusCountVO>> selectCheckStatusDeptCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckStatusDeptCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计状态 按人
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/user/status")
	public R<List<CheckStatisticsStatusCountVO>> selectCheckStatusDeptUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckStatusDeptUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计时效性详情
	 * }
	 * @Date 11:43 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/dept/timeliness")
	public R<CheckStatisticsTimelinessDetailVO> selectCheckTimelinessDeptDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTimelinessDeptDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计时效性 按组
	 * }
	 * @Date 11:43 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/timeliness")
	public R<List<CheckStatisticsTimelinessCountVO>> selectCheckTimelinessDeptCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTimelinessDeptCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计时效性统计 按人
	 * }
	 * @Date 11:43 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/user/timeliness")
	public R<List<CheckStatisticsTimelinessCountVO>> selectCheckTimelinessDeptUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTimelinessDeptUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计逾期状态详情
	 * }
	 * @Date 14:14 2023/5/8
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/dept/overdue")
	public R<CheckStatisticsOverdueDetailVO> selectCheckOverdueDeptDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckOverdueDeptDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计逾期状态统计 按组
	 * }
	 * @Date 14:14 2023/5/8
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/overdue")
	public R<List<CheckStatisticsOverdueCountVO>> selectCheckOverdueDeptCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckOverdueDeptCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计逾期状态统计 按人
	 * }
	 * @Date 14:14 2023/5/8
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/user/overdue")
	public R<List<CheckStatisticsOverdueCountVO>> selectCheckOverdueDeptUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckOverdueDeptUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计时长性详情
	 * }
	 * @Date 11:43 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/dept/duration")
	public R<CheckStatisticsDurationDetailVO> selectCheckDurationDeptDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckDurationDeptDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计时长性 按组
	 * }
	 * @Date 16:32 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/duration")
	public R<List<CheckStatisticsDurationCountVO>> selectCheckDurationDeptCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckDurationDeptCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计时长性 按人
	 * }
	 * @Date 16:32 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/user/duration")
	public R<List<CheckStatisticsDurationCountVO>> selectCheckDurationDeptUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckDurationDeptUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计签到签退详情
	 * }
	 * @Date 11:43 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/dept/sign")
	public R<CheckStatisticsSignDetailVO> selectCheckSignDeptDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckSignDeptDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计签到签退 按组
	 * }
	 * @Date 16:32 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/sign")
	public R<List<CheckStatisticsSignCountVO>> selectCheckSignDeptCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckSignDeptCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计签到签退 按人
	 * }
	 * @Date 16:32 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/user/sign")
	public R<List<CheckStatisticsSignCountVO>> selectCheckSignDeptUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckSignDeptUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养工作时长趋势整体
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/entirety/work/time")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendEntiretyWorkTime(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendEntiretyWorkTime(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养执行趋势整体
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/entirety/status")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendEntiretyStatus(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendEntiretyStatus(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养时效性趋势整体
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/entirety/timeliness")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendEntiretyTimeliness(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendEntiretyTimeliness(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养逾期趋势整体
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/entirety/overdue")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendEntiretyOverdue(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendEntiretyOverdue(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养签到签退趋势整体
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/entirety/sign")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendEntiretySign(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendEntiretySign(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养工作时长趋势对比按组
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/work/time")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastDeptWorkTime(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastDeptWorkTime(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养工作时长趋势对比按人
	 * }
	 * @Date 11:40 2022/12/5
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/user/work/time")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastUserWorkTime(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastUserWorkTime(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养执行趋势对比按组
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/status")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastDeptStatus(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastDeptStatus(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养执行趋势对比按人
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/user/status")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastUserStatus(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastUserStatus(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养时效性趋势对比按组
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/timeliness")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastDeptTimeliness(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastDeptTimeliness(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养时效性趋势对比按人
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/user/timeliness")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastUserTimeliness(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastUserTimeliness(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养逾期趋势对比按组
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/overdue")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastDeptOverdue(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastDeptOverdue(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养逾期趋势对比按人
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/user/overdue")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastUserOverdue(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastUserOverdue(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养签到签退趋势对比按组
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/sign")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastDeptSign(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastDeptSign(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养签到签退趋势对比按人
	 * }
	 * @Date 10:28 2022/12/2
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/user/sign")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastUserSign(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastUserSign(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养工作时长详情
	 * }
	 * @Date 14:56 2022/12/9
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/user/work/time")
	public R<CheckStatisticsWorkTimeDetailVO> selectCheckWorkTimeUserDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckWorkTimeUserDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养执行详情
	 * }
	 * @Date 14:56 2022/12/9
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/user/status")
	public R<CheckStatisticsStatusDetailVO> selectCheckStatusUserDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckStatusUserDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养统计状态
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/user/status")
	public R<List<CheckStatisticsUserCountVO>> selectCheckStatusUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckStatusUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养时效性详情
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/user/timeliness")
	public R<CheckStatisticsTimelinessDetailVO> selectCheckTimelinessUserDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTimelinessUserDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养逾期详情
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/user/overdue")
	public R<CheckStatisticsOverdueDetailVO> selectCheckOverdueUserDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckOverdueUserDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养时效性统计
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/user/timeliness")
	public R<List<CheckStatisticsUserCountVO>> selectCheckTimelinessUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTimelinessUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养逾期统计
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/user/overdue")
	public R<List<CheckStatisticsUserCountVO>> selectCheckOverdueUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckOverdueUserCount(queryDTO));
	}


	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养时长性详情
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/user/duration")
	public R<CheckStatisticsDurationDetailVO> selectCheckDurationUserDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckDurationUserDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养时长性统计
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/user/duration")
	public R<List<CheckStatisticsUserCountVO>> selectCheckDurationUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckDurationUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养统计签到签退详情
	 * }
	 * @Date 11:43 2022/12/1
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/user/sign")
	public R<CheckStatisticsSignDetailVO> selectCheckSignUserDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckSignUserDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养统计签到签退统计
	 * }
	 * @Date 9:39 2022/11/30
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/user/sign")
	public R<List<CheckStatisticsUserCountVO>> selectCheckSignUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckSignUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   维修状态统计
	 * }
	 * @Date 10:18 2023/6/29
	 * @Param
	 * @return
	 **/
	@PostMapping("/wx/status/count")
	public R<WxPlanStatusCountVO> wxPlanStatusCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planContentStatisticalService.wxPlanStatusCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   重复故障统计
	 * }
	 * @Date 10:18 2023/6/29
	 * @Param
	 * @return
	 **/
	@PostMapping("/wx/repetition/count")
	public R<WxRepetitionVO> wxRepetitionCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planContentStatisticalService.wxRepetitionCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   项目电梯明细
	 * }
	 * @Date 9:40 2023/7/3
	 * @Param
	 * @return
	 **/
	@PostMapping("/wx/building/elevator/repetition/detail")
	public R<IPage<WxBuildingSimpleVO>> wxBuildingElevatorRepetitionDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO, @RequestBody Query query){
		return R.data(planContentStatisticalService.wxBuildingElevatorRepetitionDetail(queryDTO, Condition.getPage(query)));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   项目电梯明细
	 * }
	 * @Date 9:40 2023/7/3
	 * @Param
	 * @return
	 **/
	@PostMapping("/wx/building/elevator/repetition/count")
	public R<Map<String,Long>> wxBuildingElevatorRepetitionCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planContentStatisticalService.wxBuildingElevatorRepetitionCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   项目任务明细统计
	 * }
	 * @Date 9:40 2023/7/3
	 * @Param
	 * @return
	 **/
	@PostMapping("/wx/building/count")
	public R<Map<String,Long>> wxBuildingCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planContentStatisticalService.wxBuildingCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   项目任务明细
	 * }
	 * @Date 9:40 2023/7/3
	 * @Param
	 * @return
	 **/
	@PostMapping("/wx/building/detail")
	public R<IPage<WxBuildingSimpleVO>> wxBuildingDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO,@RequestBody Query query){
		return R.data(planContentStatisticalService.wxBuildingDetail(queryDTO,Condition.getPage(query)));
	}

	/**
	 * 获取部门树形结构
	 */
	@GetMapping("/wx/count/dept/tree")
	@ApiOperationSupport(order = 4)
	@ApiOperation(value = "树形结构", notes = "树形结构")
	public R<List<DeptVO>> wxCountDeptTree(String tenantId, BladeUser bladeUser) {
		List<DeptVO> tree = deptService.wxCountDeptTree(Func.toStrWithEmpty(tenantId, bladeUser.getTenantId()));
		return R.data(tree);
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养工作时长趋势整体V2
	 * }
	 * @Date 10:28 2025/07/07
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/entirety/work/duration")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendEntiretyWorkDuration(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendEntiretyWorkDuration(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养统计时长详情V2
	 * }
	 * @Date 11:47 2025/07/07
	 * @Param query
	 * @return CheckStatisticsWorkTimeDetailVO
	 **/
	@PostMapping("/detail/dept/work/duration")
	public R<CheckStatisticsWorkTimeDetailVO> selectCheckWorkDurationDeptDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckWorkDurationDeptDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询个人保养工作时长详情V2
	 * }
	 * @Date 14:56 2025/07/07
	 * @Param
	 * @return
	 **/
	@PostMapping("/detail/user/work/duration")
	public R<CheckStatisticsWorkTimeDetailVO> selectCheckWorkDurationUserDetail(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckWorkDurationUserDetail(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养时长统计 按组V2
	 * }
	 * @Date 9:39 2025/07/07
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/work/duration")
	public R<List<CheckStatisticsWorkTimeCountVO>> selectCheckWorkDurationDeptCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckWorkDurationDeptCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养时长统计 按人V2
	 * }
	 * @Date 9:39 2025/07/08
	 * @Param
	 * @return
	 **/
	@PostMapping("/count/dept/user/work/duration")
	public R<List<CheckStatisticsWorkTimeCountVO>> selectCheckWorkDurationDeptUserCount(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckWorkDurationDeptUserCount(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养工作时长趋势对比按组V2
	 * }
	 * @Date 9:39 2025/07/08
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/work/duration")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastDeptWorkDuration(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastDeptWorkDuration(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询保养工作时长趋势对比按人V2
	 * }
	 * @Date 10:00 2025/07/08
	 * @Param
	 * @return
	 **/
	@PostMapping("/trend/contrast/dept/user/work/duration")
	public R<List<CheckStatisticsTrendVO>> selectCheckTrendContrastUserWorkDuration(@RequestBody PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectCheckTrendContrastUserWorkDuration(queryDTO));
	}

	/**
	 * @Author lsay
	 * @Description {
	 *   查询统计子级项目电梯分页列表
	 * }
	 * @Date 11:03 2025/7/9
	 * @Param temp:{
	 *     1-未设置责任组
	 *     2-未设置责任人
	 *     3-从未排期电梯
	 *     4-无剩余排期 区分年审类型及在保情况
	 *     5-是否违规
	 *     6-已脱保 有剩余排期
	 * }
	 * @return
	 **/
	@GetMapping("/building/elevator/page")
	public R<Map<String,Object>> selectPlanCheckBuildingElevatorPage(Query query,PlanCheckStatisticsQueryDTO queryDTO){
		return R.data(planUserDayCountService.selectPlanCheckBuildingElevatorPage(Condition.getPage(query),queryDTO));
	}

}
